import { createRouter, createWebHistory } from 'vue-router';
import MainMenu from '../components/MainMenu.vue';
import StudentSelect from '../components/StudentSelect.vue';
import StudentInsert from '../components/StudentInsert.vue';
import StudentDelete from '../components/StudentDelete.vue';
import StudentUpdate from '../components/StudentUpdate.vue';
import AgeStatic from '../components/AgeStatic.vue';
import PoliticStatic from '../components/PoliticStatic.vue';
import LocationStatic from '../components/LocationStatic.vue';
import ScoreSelect from '../components/ScoreSelect.vue';
import ScoreUpdate from '../components/ScoreUpdate.vue';
import ScoreStatic from '../components/ScoreStatic.vue';

const routes = [
 { path: '/', redirect: '/main' },
 { path: '/main', component: MainMenu },
 { path: '/info/select', component: StudentSelect },
 { path: '/info/insert', component: StudentInsert },
 { path: '/info/update', component: StudentUpdate },
 { path: '/info/delete', component: StudentDelete },
 { path: '/statistic/age', component: AgeStatic },
 { path: '/statistic/politic', component: PoliticStatic },
 { path: '/statistic/Location', component: LocationStatic },
 { path: '/score/search', component: ScoreSelect },
 { path: '/score/update', component: ScoreUpdate },
 { path: '/statistic/score', component: ScoreStatic },
];

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes,
})

export default router;
